package com.htgd.gardenexpo.dao;

import com.htgd.gardenexpo.entity.GeConFreeSports;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.htgd.gardenexpo.vo.MyFreeSportsRecordVO;
import com.htgd.gardenexpo.vo.MySportsRecordVO;
import com.htgd.gardenexpo.vo.MyTaskDetails;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * 自由跑 Mapper 接口
 * </p>
 *
 * @author author
 * @since 2025-02-27
 */
public interface GeConFreeSportsMapper extends BaseMapper<GeConFreeSports> {

    Map<String, Object> getTotalByOpenId(@Param("openId") String openId);

    List<MyFreeSportsRecordVO> getRecordByOpenId(@Param("openId") String openId);

    Map<String, Object> getMySportTotalByOpenId(@Param("openId")String openId);

    double getSumMileageWeekByOpenId(@Param("openId") String openId);

    int getSumSportsTimeWeekByOpenId(@Param("openId")String openId);

    double getSumMileageLastWeekByOpenId(@Param("openId")String openId);

    int getSumSportsTimeLastWeekByOpenId(@Param("openId")String openId);

    double getSumMileageLastWeek1ByOpenId(@Param("openId")String openId);

    int getSumSportsTimeLastWeek1ByOpenId(@Param("openId")String openId);

    double getSumMileageLastWeek2ByOpenId(@Param("openId")String openId);

    int getSumSportsTimeLastWeek2ByOpenId(@Param("openId")String openId);

    int getMonthNum(@Param("openId")String openId, @Param("lastMonthStr")String lastMonthStr);

    int getQuarterNum(@Param("openId")String openId, @Param("lastQuarterYear")int lastQuarterYear, @Param("lastQuarter")int lastQuarter);

    int getYearNum(@Param("openId")String openId, @Param("lastYear")int lastYear);

    double getSumMileageByOpenId(@Param("openId") String openId);

    double getSumMileageByOpenIdAndDate(@Param("openId")String openId,@Param("date") String date);

    MyTaskDetails getTaskDetails(@Param("taskId") String taskId);

    List<String> getTaskTrack(@Param("taskId")String taskId);

    double getSumDurationByOpenId(@Param("openId") String openId);

    List<MySportsRecordVO> getSportsRecord(@Param("openId") String openId);
}
